package 继承.多态练习;

public class 多态测试 {
    public static void main(String[] args) {

        Dog dog = new Dog(2,"黄");
        Cat cat = new Cat(3,"白");
        Animal animal = new Cat(1,"棕色");
        Person pe = new Person("老王",50);

        pe.keepPet(dog,"骨头");
        pe.keepPet(cat,"小鱼干");

    }
}
